Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0

Q is empty.

The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)


Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y) → IF(gt(x, y), x, y)
MINUS(x, y) → GT(x, y)
IF(true, x, y) → MINUS(p(x), y)
IF(true, x, y) → P(x)
GE(s(x), s(y)) → GE(x, y)
GT(s(x), s(y)) → GT(x, y)
DIV(x, y) → IF1(ge(x, y), x, y)
DIV(x, y) → GE(x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF1(true, x, y) → GT(y, 0)
IF2(true, x, y) → DIV(minus(x, y), y)
IF2(true, x, y) → MINUS(x, y)

The TRS R consists of the following rules:

minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y) → IF(gt(x, y), x, y)
MINUS(x, y) → GT(x, y)
IF(true, x, y) → MINUS(p(x), y)
IF(true, x, y) → P(x)
GE(s(x), s(y)) → GE(x, y)
GT(s(x), s(y)) → GT(x, y)
DIV(x, y) → IF1(ge(x, y), x, y)
DIV(x, y) → GE(x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF1(true, x, y) → GT(y, 0)
IF2(true, x, y) → DIV(minus(x, y), y)
IF2(true, x, y) → MINUS(x, y)

The TRS R consists of the following rules:

minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 4 SCCs with 5 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GT(s(x), s(y)) → GT(x, y)

The TRS R consists of the following rules:

minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GT(s(x), s(y)) → GT(x, y)

R is empty.
The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GT(s(x), s(y)) → GT(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GE(s(x), s(y)) → GE(x, y)

The TRS R consists of the following rules:

minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GE(s(x), s(y)) → GE(x, y)

R is empty.
The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GE(s(x), s(y)) → GE(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IF(true, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(gt(x, y), x, y)

The TRS R consists of the following rules:

minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IF(true, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(gt(x, y), x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPOrderProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IF(true, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(gt(x, y), x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

p(0)
p(s(x0))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF(true, x, y) → MINUS(p(x), y)
The remaining pairs can at least be oriented weakly.

MINUS(x, y) → IF(gt(x, y), x, y)
Used ordering: Polynomial interpretation [POLO,RATPOLO]:

POL(true) = 1   
POL(MINUS(x1, x2)) = (1/2)x1   
POL(false) = 0   
POL(p(x1)) = 1/4 + (1/2)x1   
POL(s(x1)) = 4 + (4)x1   
POL(IF(x1, x2, x3)) = (1/4)x1 + (1/4)x2   
POL(gt(x1, x2)) = x1   
POL(0) = 0   
The value of delta used in the strict ordering is 1/8.
The following usable rules [FROCOS05] were oriented:

gt(s(x), s(y)) → gt(x, y)
gt(s(x), 0) → true
gt(0, y) → false
p(s(x)) → x
p(0) → 0



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ QDPOrderProof
QDP
                            ↳ DependencyGraphProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y) → IF(gt(x, y), x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)

The set Q consists of the following terms:

p(0)
p(s(x0))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)

The TRS R consists of the following rules:

minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ Rewriting
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule IF2(true, x, y) → DIV(minus(x, y), y) at position [0] we obtained the following new rules [LPAR04]:

IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
QDP
                            ↳ Narrowing
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [LPAR04] the rule DIV(x, y) → IF1(ge(x, y), x, y) at position [0] we obtained the following new rules [LPAR04]:

DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
DIV(0, s(x0)) → IF1(false, 0, s(x0))
DIV(x0, 0) → IF1(true, x0, 0)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ DependencyGraphProof
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
DIV(0, s(x0)) → IF1(false, 0, s(x0))
DIV(x0, 0) → IF1(true, x0, 0)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
QDP
                                    ↳ Narrowing
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, x, y) → IF2(gt(y, 0), x, y)
DIV(x0, 0) → IF1(true, x0, 0)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [LPAR04] the rule IF1(true, x, y) → IF2(gt(y, 0), x, y) at position [0] we obtained the following new rules [LPAR04]:

IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF1(true, y0, 0) → IF2(false, y0, 0)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ DependencyGraphProof
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
DIV(x0, 0) → IF1(true, x0, 0)
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF1(true, y0, 0) → IF2(false, y0, 0)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
QDP
                                            ↳ Narrowing
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [LPAR04] the rule IF2(true, x, y) → DIV(if(gt(x, y), x, y), y) at position [0] we obtained the following new rules [LPAR04]:

IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
IF2(true, 0, x0) → DIV(if(false, 0, x0), x0)
IF2(true, s(x0), 0) → DIV(if(true, s(x0), 0), 0)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Narrowing
QDP
                                                ↳ DependencyGraphProof
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
IF2(true, 0, x0) → DIV(if(false, 0, x0), x0)
IF2(true, s(x0), 0) → DIV(if(true, s(x0), 0), 0)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ DependencyGraphProof
QDP
                                                    ↳ Instantiation
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [LPAR04] the rule IF1(true, y0, s(x0)) → IF2(true, y0, s(x0)) we obtained the following new rules [LPAR04]:

IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Instantiation
QDP
                                                        ↳ MNOCProof
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We use the modular non-overlap check [FROCOS05] to decrease Q to the empty set.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ DependencyGraphProof
                                                  ↳ QDP
                                                    ↳ Instantiation
                                                      ↳ QDP
                                                        ↳ MNOCProof
QDP
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

Q is empty.
We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ MNOCProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We use the modular non-overlap check [FROCOS05] to decrease Q to the empty set.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ MNOCProof
QDP

Q DP problem:
The TRS P consists of the following rules:

IF2(true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)

The TRS R consists of the following rules:

gt(0, y) → false
gt(s(x), 0) → true
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

Q is empty.
We have to consider all (P,Q,R)-chains.